﻿using HiSport.Core.Entity.Order;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HiSport.Application.Service.OrderManage.OrderFixeSite.Dtos
{
    /// <summary>
    /// 分页Dto
    /// </summary>
    public class OrderFixeSitePageDto: BasePageInput
    {
        /// <summary>
        /// 会员名称/电话号码
        /// </summary>
        public string MemberInfo { get; set; }

        /// <summary>
        /// 场地类型
        /// </summary>
        public long? SiteTypeId { get; set; }


        /// <summary>
        /// 订单状态
        /// </summary>
        public OrderStateEnum? OrderState { get; set; }

        /// <summary>
        /// 固定场地开始时间  
        /// </summary>
        public DateTime? FixeSiteStartTime { get; set; }

        /// <summary>
        /// 固定场地结束时间  
        /// </summary>
        public DateTime? FixeSiteEndTime { get; set; }
    }


    /// <summary>
    /// 固定订场
    /// </summary>
    public class OrderFixeSiteDto: HiSport.Core.Entity.Order.OrderFixeSite
    {

        public string SiteTypeName { get; set; }

        /// <summary>
        /// 总场次
        /// </summary>
        public decimal TotalCount { get; set; }

        /// <summary>
        /// 完成场次
        /// </summary>
        public decimal CompleteCount { get; set; }

        /// <summary>
        /// 固定场次
        /// </summary>
        public List<OrderFixeSiteInfoDto> OrderFixeSiteInfos { get; set; }
    }

    /// <summary>
    /// 固定订场详情
    /// </summary>
    public class OrderFixeSiteInfoDto : OrderFixeSiteInfo
    {

        public DayOfWeek Week { get; set; }
    }



    /// <summary>
    /// 固定订场创建Dto
    /// </summary>
    public class FixedOrderSiteCreateOrUpdateDto
    {
        public long Id { get; set; }

        /// <summary>
        /// 固定预定
        /// </summary>
        public long MemberId { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 场地类型Id
        /// </summary>
        public long SiteTypeId { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime FixedStartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime FixedEndTime { get; set; }

        /// <summary>
        /// 时间详情
        /// </summary>
        public List<FixedOrderSiteCreateOrUpdateInfoDto> FixedOrderSiteInfos { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(200)]
        public string Remark { get; set; }

    }

    /// <summary>
    /// 固定订场详情 创建Dto
    /// </summary>
    public class FixedOrderSiteCreateOrUpdateInfoDto
    {
        /// <summary>
        /// 星期
        /// </summary>
        public List<DayOfWeek> WeekList { get; set; }

        /// <summary>
        /// 场地Id
        /// </summary>
        public List<long> SiteIds { get; set; }

        /// <summary>
        /// 预定时间
        /// </summary>
        public List<ScheduledTime> ScheduledTimes { get; set; }


    }

    /// <summary>
    /// 预定时间
    /// </summary>
    public class ScheduledTime
    {
        /// <summary>
        /// 开始时间
        /// </summary>
        public string StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public string EndTime { get; set; }
    }

}
